/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.icybear.gae.pechapaii;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author Bearice
 */
@Controller
@RequestMapping("/logout.wml")
public class Logout {

    @RequestMapping
    public String logout(HttpSession sess, HttpServletResponse response) {
        sess.invalidate();
        response.addCookie(new Cookie("user", ""));
        response.addCookie(new Cookie("pass", ""));
        return "wml/login";
    }
}
